Optimal. Leaf size=57 \[ -\frac{a \cot ^3(c+d x)}{3 d}-\frac{a \cot (c+d x)}{d}-\frac{b \cot ^2(c+d x)}{2 d}+\frac{b \log (\tan (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0879247, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {766} \[ -\frac{a \cot ^3(c+d x)}{3 d}-\frac{a \cot (c+d x)}{d}-\frac{b \cot ^2(c+d x)}{2 d}+\frac{b \log (\tan (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 766
Rubi steps
\begin{align*} \int \csc ^4(c+d x) (a+b \tan (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{(a+b x) \left (1+x^2\right )}{x^4} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{a}{x^4}+\frac{b}{x^3}+\frac{a}{x^2}+\frac{b}{x}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{a \cot (c+d x)}{d}-\frac{b \cot ^2(c+d x)}{2 d}-\frac{a \cot ^3(c+d x)}{3 d}+\frac{b \log (\tan (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.244585, size = 72, normalized size = 1.26 \[ -\frac{2 a \cot (c+d x)}{3 d}-\frac{a \cot (c+d x) \csc ^2(c+d x)}{3 d}-\frac{b \left (\csc ^2(c+d x)-2 \log (\sin (c+d x))+2 \log (\cos (c+d x))\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.081, size = 60, normalized size = 1.1 \begin{align*} -{\frac{b}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}}+{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{d}}-{\frac{2\,\cot \left ( dx+c \right ) a}{3\,d}}-{\frac{\cot \left ( dx+c \right ) a \left ( \csc \left ( dx+c \right ) \right ) ^{2}}{3\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.12848, size = 68, normalized size = 1.19 \begin{align*} \frac{6 \, b \log \left (\tan \left (d x + c\right )\right ) - \frac{6 \, a \tan \left (d x + c\right )^{2} + 3 \, b \tan \left (d x + c\right ) + 2 \, a}{\tan \left (d x + c\right )^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.79451, size = 316, normalized size = 5.54 \begin{align*} -\frac{4 \, a \cos \left (d x + c\right )^{3} + 3 \,{\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 3 \,{\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) - 6 \, a \cos \left (d x + c\right ) - 3 \, b \sin \left (d x + c\right )}{6 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \csc ^{4}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.36171, size = 84, normalized size = 1.47 \begin{align*} \frac{6 \, b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac{11 \, b \tan \left (d x + c\right )^{3} + 6 \, a \tan \left (d x + c\right )^{2} + 3 \, b \tan \left (d x + c\right ) + 2 \, a}{\tan \left (d x + c\right )^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]